<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: Graph API: Math operations</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Graph API: Math operations<div class="ingroups"><a class="el" href="../../df/d1f/group__gapi__core.html">G-API Core functionality</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3fec036f5cf3f6cb8c2633c109085f0b"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#ga3fec036f5cf3f6cb8c2633c109085f0b">cv::gapi::add</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src1, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src2, int ddepth=-1)</td></tr>
<tr class="memdesc:ga3fec036f5cf3f6cb8c2633c109085f0b"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the per-element sum of two matrices.  <a href="../../da/dd3/group__gapi__math.html#ga3fec036f5cf3f6cb8c2633c109085f0b">More...</a><br/></td></tr>
<tr class="separator:ga3fec036f5cf3f6cb8c2633c109085f0b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga8b5f4be4cb0e2b52b03778fafddd0819"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#ga8b5f4be4cb0e2b52b03778fafddd0819">cv::gapi::addC</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src1, const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;c, int ddepth=-1)</td></tr>
<tr class="memdesc:ga8b5f4be4cb0e2b52b03778fafddd0819"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the per-element sum of matrix and given scalar.  <a href="../../da/dd3/group__gapi__math.html#ga8b5f4be4cb0e2b52b03778fafddd0819">More...</a><br/></td></tr>
<tr class="separator:ga8b5f4be4cb0e2b52b03778fafddd0819"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab51408fdde1ec0a5d4fe5123826180ce"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#gab51408fdde1ec0a5d4fe5123826180ce">cv::gapi::addC</a> (const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;c, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src1, int ddepth=-1)</td></tr>
<tr class="separator:gab51408fdde1ec0a5d4fe5123826180ce"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga3e20a87f89b397c27a9a8bfd57ff0180"><td align="right" class="memItemLeft" valign="top">std::tuple&lt; <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>, <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#ga3e20a87f89b397c27a9a8bfd57ff0180">cv::gapi::cartToPolar</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;x, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;y, bool angleInDegrees=false)</td></tr>
<tr class="memdesc:ga3e20a87f89b397c27a9a8bfd57ff0180"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the magnitude and angle of 2D vectors.  <a href="../../da/dd3/group__gapi__math.html#ga3e20a87f89b397c27a9a8bfd57ff0180">More...</a><br/></td></tr>
<tr class="separator:ga3e20a87f89b397c27a9a8bfd57ff0180"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac8d294174992b969881304c7035a5f9f"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#gac8d294174992b969881304c7035a5f9f">cv::gapi::div</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src1, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src2, double scale, int ddepth=-1)</td></tr>
<tr class="memdesc:gac8d294174992b969881304c7035a5f9f"><td class="mdescLeft"> </td><td class="mdescRight">Performs per-element division of two matrices.  <a href="../../da/dd3/group__gapi__math.html#gac8d294174992b969881304c7035a5f9f">More...</a><br/></td></tr>
<tr class="separator:gac8d294174992b969881304c7035a5f9f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gabcbc1a4cc9301f8315b19b1aec4fd5d0"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#gabcbc1a4cc9301f8315b19b1aec4fd5d0">cv::gapi::divC</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;divisor, double scale, int ddepth=-1)</td></tr>
<tr class="memdesc:gabcbc1a4cc9301f8315b19b1aec4fd5d0"><td class="mdescLeft"> </td><td class="mdescRight">Divides matrix by scalar.  <a href="../../da/dd3/group__gapi__math.html#gabcbc1a4cc9301f8315b19b1aec4fd5d0">More...</a><br/></td></tr>
<tr class="separator:gabcbc1a4cc9301f8315b19b1aec4fd5d0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab715e84ee54c737916007ff7b8e6dcda"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#gab715e84ee54c737916007ff7b8e6dcda">cv::gapi::divRC</a> (const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;divident, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, double scale, int ddepth=-1)</td></tr>
<tr class="memdesc:gab715e84ee54c737916007ff7b8e6dcda"><td class="mdescLeft"> </td><td class="mdescRight">Divides scalar by matrix.  <a href="../../da/dd3/group__gapi__math.html#gab715e84ee54c737916007ff7b8e6dcda">More...</a><br/></td></tr>
<tr class="separator:gab715e84ee54c737916007ff7b8e6dcda"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaba076d51941328cb7ca9348b7b535220"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#gaba076d51941328cb7ca9348b7b535220">cv::gapi::mask</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;mask)</td></tr>
<tr class="memdesc:gaba076d51941328cb7ca9348b7b535220"><td class="mdescLeft"> </td><td class="mdescRight">Applies a mask to a matrix.  <a href="../../da/dd3/group__gapi__math.html#gaba076d51941328cb7ca9348b7b535220">More...</a><br/></td></tr>
<tr class="separator:gaba076d51941328cb7ca9348b7b535220"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa37ea1b811bcc3e26ee1b3fb00acc55c"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#gaa37ea1b811bcc3e26ee1b3fb00acc55c">cv::gapi::mean</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src)</td></tr>
<tr class="memdesc:gaa37ea1b811bcc3e26ee1b3fb00acc55c"><td class="mdescLeft"> </td><td class="mdescRight">Calculates an average (mean) of matrix elements.  <a href="../../da/dd3/group__gapi__math.html#gaa37ea1b811bcc3e26ee1b3fb00acc55c">More...</a><br/></td></tr>
<tr class="separator:gaa37ea1b811bcc3e26ee1b3fb00acc55c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga42a8187b2bf350f90e4a31f93e929e51"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#ga42a8187b2bf350f90e4a31f93e929e51">cv::gapi::mul</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src1, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src2, double scale=1.0, int ddepth=-1)</td></tr>
<tr class="memdesc:ga42a8187b2bf350f90e4a31f93e929e51"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the per-element scaled product of two matrices.  <a href="../../da/dd3/group__gapi__math.html#ga42a8187b2bf350f90e4a31f93e929e51">More...</a><br/></td></tr>
<tr class="separator:ga42a8187b2bf350f90e4a31f93e929e51"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa924c8c082e0476e4d846843d5f8bed3"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#gaa924c8c082e0476e4d846843d5f8bed3">cv::gapi::mulC</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, double multiplier, int ddepth=-1)</td></tr>
<tr class="memdesc:gaa924c8c082e0476e4d846843d5f8bed3"><td class="mdescLeft"> </td><td class="mdescRight">Multiplies matrix by scalar.  <a href="../../da/dd3/group__gapi__math.html#gaa924c8c082e0476e4d846843d5f8bed3">More...</a><br/></td></tr>
<tr class="separator:gaa924c8c082e0476e4d846843d5f8bed3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga173028247b9426f6e744c18df02c10f1"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#ga173028247b9426f6e744c18df02c10f1">cv::gapi::mulC</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;multiplier, int ddepth=-1)</td></tr>
<tr class="separator:ga173028247b9426f6e744c18df02c10f1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga29ed07435c1ab0da02627303594a9b73"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#ga29ed07435c1ab0da02627303594a9b73">cv::gapi::mulC</a> (const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;multiplier, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, int ddepth=-1)</td></tr>
<tr class="separator:ga29ed07435c1ab0da02627303594a9b73"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga3c98a8ad1054d296500220737c04d18c"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#ga3c98a8ad1054d296500220737c04d18c">cv::gapi::phase</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;x, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;y, bool angleInDegrees=false)</td></tr>
<tr class="memdesc:ga3c98a8ad1054d296500220737c04d18c"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the rotation angle of 2D vectors.  <a href="../../da/dd3/group__gapi__math.html#ga3c98a8ad1054d296500220737c04d18c">More...</a><br/></td></tr>
<tr class="separator:ga3c98a8ad1054d296500220737c04d18c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae523b4bd51ddcca2833c9aebbd7fe5a4"><td align="right" class="memItemLeft" valign="top">std::tuple&lt; <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>, <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#gae523b4bd51ddcca2833c9aebbd7fe5a4">cv::gapi::polarToCart</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;<a class="el" href="../../d2/de8/group__core__array.html#ga6d3b097586bca4409873d64a90fe64c3">magnitude</a>, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;angle, bool angleInDegrees=false)</td></tr>
<tr class="memdesc:gae523b4bd51ddcca2833c9aebbd7fe5a4"><td class="mdescLeft"> </td><td class="mdescRight">Calculates x and y coordinates of 2D vectors from their magnitude and angle.  <a href="../../da/dd3/group__gapi__math.html#gae523b4bd51ddcca2833c9aebbd7fe5a4">More...</a><br/></td></tr>
<tr class="separator:gae523b4bd51ddcca2833c9aebbd7fe5a4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaf3880c8feae9027fa91a701a1fd0d3b4"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#gaf3880c8feae9027fa91a701a1fd0d3b4">cv::gapi::sqrt</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src)</td></tr>
<tr class="memdesc:gaf3880c8feae9027fa91a701a1fd0d3b4"><td class="mdescLeft"> </td><td class="mdescRight">Calculates a square root of array elements.  <a href="../../da/dd3/group__gapi__math.html#gaf3880c8feae9027fa91a701a1fd0d3b4">More...</a><br/></td></tr>
<tr class="separator:gaf3880c8feae9027fa91a701a1fd0d3b4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab2a1ac8bdeda1de78ec97f9cd8e9ff0a"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#gab2a1ac8bdeda1de78ec97f9cd8e9ff0a">cv::gapi::sub</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src1, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src2, int ddepth=-1)</td></tr>
<tr class="memdesc:gab2a1ac8bdeda1de78ec97f9cd8e9ff0a"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the per-element difference between two matrices.  <a href="../../da/dd3/group__gapi__math.html#gab2a1ac8bdeda1de78ec97f9cd8e9ff0a">More...</a><br/></td></tr>
<tr class="separator:gab2a1ac8bdeda1de78ec97f9cd8e9ff0a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa5979f64bab17bf1717f2842d6c1d53f"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#gaa5979f64bab17bf1717f2842d6c1d53f">cv::gapi::subC</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;c, int ddepth=-1)</td></tr>
<tr class="memdesc:gaa5979f64bab17bf1717f2842d6c1d53f"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the per-element difference between matrix and given scalar.  <a href="../../da/dd3/group__gapi__math.html#gaa5979f64bab17bf1717f2842d6c1d53f">More...</a><br/></td></tr>
<tr class="separator:gaa5979f64bab17bf1717f2842d6c1d53f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga755bf791d27f88ab5b4214575bf4c5a8"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dd3/group__gapi__math.html#ga755bf791d27f88ab5b4214575bf4c5a8">cv::gapi::subRC</a> (const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;c, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, int ddepth=-1)</td></tr>
<tr class="memdesc:ga755bf791d27f88ab5b4214575bf4c5a8"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the per-element difference between given scalar and the matrix.  <a href="../../da/dd3/group__gapi__math.html#ga755bf791d27f88ab5b4214575bf4c5a8">More...</a><br/></td></tr>
<tr class="separator:ga755bf791d27f88ab5b4214575bf4c5a8"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga3fec036f5cf3f6cb8c2633c109085f0b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3fec036f5cf3f6cb8c2633c109085f0b">◆ </a></span>add()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::add </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.gapi.add(</td><td class="paramname">src1, src2[, ddepth]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the per-element sum of two matrices. </p>
<p>The function add calculates sum of two matrices of the same size and the same number of channels: </p><p class="formulaDsp">
\[\texttt{dst}(I) = \texttt{saturate} ( \texttt{src1}(I) + \texttt{src2}(I)) \quad \texttt{if mask}(I) \ne0\]
</p>
<p>The function can be replaced with matrix expressions: </p><p class="formulaDsp">
\[\texttt{dst} = \texttt{src1} + \texttt{src2}\]
</p>
<p>The input matrices and the output matrix can all have the same or different depths. For example, you can add a 16-bit unsigned matrix to a 8-bit signed matrix and store the sum as a 32-bit floating-point matrix. Depth of the output matrix is determined by the ddepth parameter. If <a class="el" href="../../d0/daf/group__projection.html#ga8b5e5413af41caf3f2a0bbf4cdf517a8" title="Returns the depth of a point transformed by a rigid transform. ">src1.depth()</a> == <a class="el" href="../../d0/daf/group__projection.html#ga8b5e5413af41caf3f2a0bbf4cdf517a8" title="Returns the depth of a point transformed by a rigid transform. ">src2.depth()</a>, ddepth can be set to the default -1. In this case, the output matrix will have the same depth as the input matrices.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.add" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src1</td><td>first input matrix. </td></tr>
    <tr><td class="paramname">src2</td><td>second input matrix. </td></tr>
    <tr><td class="paramname">ddepth</td><td>optional depth of the output matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#gab2a1ac8bdeda1de78ec97f9cd8e9ff0a" title="Calculates the per-element difference between two matrices. ">sub</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga60503b0500750881cc58a60e7eae084b" title="Calculates the weighted sum of two matrices. ">addWeighted</a> </dd></dl>
</div>
</div>
<a id="ga8b5f4be4cb0e2b52b03778fafddd0819"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8b5f4be4cb0e2b52b03778fafddd0819">◆ </a></span>addC() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::addC </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.gapi.addC(</td><td class="paramname">src1, c[, ddepth]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the per-element sum of matrix and given scalar. </p>
<p>The function addC adds a given scalar value to each element of given matrix. The function can be replaced with matrix expressions:</p>
<p class="formulaDsp">
\[\texttt{dst} = \texttt{src1} + \texttt{c}\]
</p>
<p>Depth of the output matrix is determined by the ddepth parameter. If ddepth is set to default -1, the depth of output matrix will be the same as the depth of input matrix. The matrices can be single or multi channel. Output matrix must have the same size and number of channels as the input matrix.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.addC" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src1</td><td>first input matrix. </td></tr>
    <tr><td class="paramname">c</td><td>scalar value to be added. </td></tr>
    <tr><td class="paramname">ddepth</td><td>optional depth of the output matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#gab2a1ac8bdeda1de78ec97f9cd8e9ff0a" title="Calculates the per-element difference between two matrices. ">sub</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga60503b0500750881cc58a60e7eae084b" title="Calculates the weighted sum of two matrices. ">addWeighted</a> </dd></dl>
</div>
</div>
<a id="gab51408fdde1ec0a5d4fe5123826180ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab51408fdde1ec0a5d4fe5123826180ce">◆ </a></span>addC() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::addC </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.gapi.addC(</td><td class="paramname">src1, c[, ddepth]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
</div>
</div>
<a id="ga3e20a87f89b397c27a9a8bfd57ff0180"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3e20a87f89b397c27a9a8bfd57ff0180">◆ </a></span>cartToPolar()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::tuple&lt;<a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>, <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>&gt; cv::gapi::cartToPolar </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>angleInDegrees</em> = <code>false</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the magnitude and angle of 2D vectors. </p>
<p>The function cartToPolar calculates either the magnitude, angle, or both for every 2D vector (x(I),y(I)): </p><p class="formulaDsp">
\[\begin{array}{l} \texttt{magnitude} (I)= \sqrt{\texttt{x}(I)^2+\texttt{y}(I)^2} , \\ \texttt{angle} (I)= \texttt{atan2} ( \texttt{y} (I), \texttt{x} (I))[ \cdot180 / \pi ] \end{array}\]
</p>
<p>The angles are calculated with accuracy about 0.3 degrees. For the point (0,0), the angle is set to 0.</p>
<p>First output is a matrix of magnitudes of the same size and depth as input x. Second output is a matrix of angles that has the same size and depth as x; the angles are measured in radians (from 0 to 2*Pi) or in degrees (0 to 360 degrees).</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.cartToPolar"</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>matrix of <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a> x-coordinates. </td></tr>
    <tr><td class="paramname">y</td><td>array of <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a> y-coordinates. </td></tr>
    <tr><td class="paramname">angleInDegrees</td><td>a flag, indicating whether the angles are measured in radians (which is by default), or in degrees. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#gae523b4bd51ddcca2833c9aebbd7fe5a4" title="Calculates x and y coordinates of 2D vectors from their magnitude and angle. ">polarToCart</a> </dd></dl>
</div>
</div>
<a id="gac8d294174992b969881304c7035a5f9f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac8d294174992b969881304c7035a5f9f">◆ </a></span>div()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::div </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>scale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Performs per-element division of two matrices. </p>
<p>The function divides one matrix by another: </p><p class="formulaDsp">
\[\texttt{dst(I) = saturate(src1(I)*scale/src2(I))}\]
</p>
<p>When src2(I) is zero, dst(I) will also be zero. Different channels of multi-channel matrices are processed independently. The matrices can be single or multi channel. Output matrix must have the same size and depth as src.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.div" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src1</td><td>first input matrix. </td></tr>
    <tr><td class="paramname">src2</td><td>second input matrix of the same size and depth as src1. </td></tr>
    <tr><td class="paramname">scale</td><td>scalar factor. </td></tr>
    <tr><td class="paramname">ddepth</td><td>optional depth of the output matrix; you can only pass -1 when <a class="el" href="../../d0/daf/group__projection.html#ga8b5e5413af41caf3f2a0bbf4cdf517a8" title="Returns the depth of a point transformed by a rigid transform. ">src1.depth()</a> == <a class="el" href="../../d0/daf/group__projection.html#ga8b5e5413af41caf3f2a0bbf4cdf517a8" title="Returns the depth of a point transformed by a rigid transform. ">src2.depth()</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#ga42a8187b2bf350f90e4a31f93e929e51" title="Calculates the per-element scaled product of two matrices. ">mul</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#ga3fec036f5cf3f6cb8c2633c109085f0b" title="Calculates the per-element sum of two matrices. ">add</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#gab2a1ac8bdeda1de78ec97f9cd8e9ff0a" title="Calculates the per-element difference between two matrices. ">sub</a> </dd></dl>
</div>
</div>
<a id="gabcbc1a4cc9301f8315b19b1aec4fd5d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabcbc1a4cc9301f8315b19b1aec4fd5d0">◆ </a></span>divC()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::divC </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>divisor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>scale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Divides matrix by scalar. </p>
<p>The function divC divides each element of matrix src by given scalar value:</p>
<p class="formulaDsp">
\[\texttt{dst(I) = saturate(src(I)*scale/divisor)}\]
</p>
<p>When divisor is zero, dst(I) will also be zero. Different channels of multi-channel matrices are processed independently. The matrices can be single or multi channel. Output matrix must have the same size and depth as src.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.divC" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input matrix. </td></tr>
    <tr><td class="paramname">divisor</td><td>number to be divided by. </td></tr>
    <tr><td class="paramname">ddepth</td><td>optional depth of the output matrix. If -1, the depth of output matrix will be the same as input matrix depth. </td></tr>
    <tr><td class="paramname">scale</td><td>scale factor. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#ga3fec036f5cf3f6cb8c2633c109085f0b" title="Calculates the per-element sum of two matrices. ">add</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#gab2a1ac8bdeda1de78ec97f9cd8e9ff0a" title="Calculates the per-element difference between two matrices. ">sub</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#gac8d294174992b969881304c7035a5f9f" title="Performs per-element division of two matrices. ">div</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga60503b0500750881cc58a60e7eae084b" title="Calculates the weighted sum of two matrices. ">addWeighted</a> </dd></dl>
</div>
</div>
<a id="gab715e84ee54c737916007ff7b8e6dcda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab715e84ee54c737916007ff7b8e6dcda">◆ </a></span>divRC()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::divRC </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>divident</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>scale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Divides scalar by matrix. </p>
<p>The function divRC divides given scalar by each element of matrix src and keep the division result in new matrix of the same size and type as src:</p>
<p class="formulaDsp">
\[\texttt{dst(I) = saturate(divident*scale/src(I))}\]
</p>
<p>When src(I) is zero, dst(I) will also be zero. Different channels of multi-channel matrices are processed independently. The matrices can be single or multi channel. Output matrix must have the same size and depth as src.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.divRC" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input matrix. </td></tr>
    <tr><td class="paramname">divident</td><td>number to be divided. </td></tr>
    <tr><td class="paramname">ddepth</td><td>optional depth of the output matrix. If -1, the depth of output matrix will be the same as input matrix depth. </td></tr>
    <tr><td class="paramname">scale</td><td>scale factor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#ga3fec036f5cf3f6cb8c2633c109085f0b" title="Calculates the per-element sum of two matrices. ">add</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#gab2a1ac8bdeda1de78ec97f9cd8e9ff0a" title="Calculates the per-element difference between two matrices. ">sub</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#gac8d294174992b969881304c7035a5f9f" title="Performs per-element division of two matrices. ">div</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga60503b0500750881cc58a60e7eae084b" title="Calculates the weighted sum of two matrices. ">addWeighted</a> </dd></dl>
</div>
</div>
<a id="gaba076d51941328cb7ca9348b7b535220"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaba076d51941328cb7ca9348b7b535220">◆ </a></span>mask()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::mask </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>mask</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Applies a mask to a matrix. </p>
<p>The function mask set value from given matrix if the corresponding pixel value in mask matrix set to true, and set the matrix value to 0 otherwise.</p>
<p>Supported src matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>. Supported mask data type is <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.mask" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input matrix. </td></tr>
    <tr><td class="paramname">mask</td><td>input mask matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#a27">samples/cpp/camshiftdemo.cpp</a>, <a class="el" href="../../db/d75/samples_2cpp_2create_mask_8cpp-example.html#a1">samples/cpp/create_mask.cpp</a>, <a class="el" href="../../d1/d17/samples_2cpp_2ffilldemo_8cpp-example.html#a1">samples/cpp/ffilldemo.cpp</a>, <a class="el" href="../../d8/d34/samples_2cpp_2grabcut_8cpp-example.html#a16">samples/cpp/grabcut.cpp</a>, <a class="el" href="../../d5/de8/samples_2cpp_2segment_objects_8cpp-example.html#a1">samples/cpp/segment_objects.cpp</a>, <a class="el" href="../../d9/dd8/samples_2cpp_2stitching_detailed_8cpp-example.html#a42">samples/cpp/stitching_detailed.cpp</a>, <a class="el" href="../../d8/ded/samples_2cpp_2tutorial_code_2Histograms_Matching_2MatchTemplate_Demo_8cpp-example.html#a1">samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp</a>, and <a class="el" href="../../dc/d23/samples_2cpp_2tutorial_code_2photo_2seamless_cloning_2cloning_demo_8cpp-example.html#a3">samples/cpp/tutorial_code/photo/seamless_cloning/cloning_demo.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="gaa37ea1b811bcc3e26ee1b3fb00acc55c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa37ea1b811bcc3e26ee1b3fb00acc55c">◆ </a></span>mean()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> cv::gapi::mean </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.gapi.mean(</td><td class="paramname">src</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates an average (mean) of matrix elements. </p>
<p>The function mean calculates the mean value M of matrix elements, independently for each channel, and return it.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.mean" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d0/d86/group__gapi__matrixop.html#gaa5f87ba17bf7d6acb1b557a4b94bae8b" title="Counts non-zero array elements. ">countNonZero</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#gab714c7a4adc847d75bfc080ac92924f4" title="Calculates per-element minimum of two matrices. ">min</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga0ff081ea80eb39a96389c16ac0f9e944" title="Calculates per-element maximum of two matrices. ">max</a> </dd></dl>
</div>
</div>
<a id="ga42a8187b2bf350f90e4a31f93e929e51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga42a8187b2bf350f90e4a31f93e929e51">◆ </a></span>mul()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::mul </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>scale</em> = <code>1.0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the per-element scaled product of two matrices. </p>
<p>The function mul calculates the per-element product of two matrices:</p>
<p class="formulaDsp">
\[\texttt{dst} (I)= \texttt{saturate} ( \texttt{scale} \cdot \texttt{src1} (I) \cdot \texttt{src2} (I))\]
</p>
<p>If <a class="el" href="../../d0/daf/group__projection.html#ga8b5e5413af41caf3f2a0bbf4cdf517a8" title="Returns the depth of a point transformed by a rigid transform. ">src1.depth()</a> == <a class="el" href="../../d0/daf/group__projection.html#ga8b5e5413af41caf3f2a0bbf4cdf517a8" title="Returns the depth of a point transformed by a rigid transform. ">src2.depth()</a>, ddepth can be set to the default -1. In this case, the output matrix will have the same depth as the input matrices. The matrices can be single or multi channel. Output matrix must have the same size as input matrices.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.mul" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src1</td><td>first input matrix. </td></tr>
    <tr><td class="paramname">src2</td><td>second input matrix of the same size and the same depth as src1. </td></tr>
    <tr><td class="paramname">scale</td><td>optional scale factor. </td></tr>
    <tr><td class="paramname">ddepth</td><td>optional depth of the output matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#ga3fec036f5cf3f6cb8c2633c109085f0b" title="Calculates the per-element sum of two matrices. ">add</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#gab2a1ac8bdeda1de78ec97f9cd8e9ff0a" title="Calculates the per-element difference between two matrices. ">sub</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#gac8d294174992b969881304c7035a5f9f" title="Performs per-element division of two matrices. ">div</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga60503b0500750881cc58a60e7eae084b" title="Calculates the weighted sum of two matrices. ">addWeighted</a> </dd></dl>
</div>
</div>
<a id="gaa924c8c082e0476e4d846843d5f8bed3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa924c8c082e0476e4d846843d5f8bed3">◆ </a></span>mulC() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::mulC </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>multiplier</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Multiplies matrix by scalar. </p>
<p>The function mulC multiplies each element of matrix src by given scalar value:</p>
<p class="formulaDsp">
\[\texttt{dst} (I)= \texttt{saturate} ( \texttt{src1} (I) \cdot \texttt{multiplier} )\]
</p>
<p>The matrices can be single or multi channel. Output matrix must have the same size as src.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.mulC" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input matrix. </td></tr>
    <tr><td class="paramname">multiplier</td><td>factor to be multiplied. </td></tr>
    <tr><td class="paramname">ddepth</td><td>optional depth of the output matrix. If -1, the depth of output matrix will be the same as input matrix depth. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#ga3fec036f5cf3f6cb8c2633c109085f0b" title="Calculates the per-element sum of two matrices. ">add</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#gab2a1ac8bdeda1de78ec97f9cd8e9ff0a" title="Calculates the per-element difference between two matrices. ">sub</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#gac8d294174992b969881304c7035a5f9f" title="Performs per-element division of two matrices. ">div</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga60503b0500750881cc58a60e7eae084b" title="Calculates the weighted sum of two matrices. ">addWeighted</a> </dd></dl>
</div>
</div>
<a id="ga173028247b9426f6e744c18df02c10f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga173028247b9426f6e744c18df02c10f1">◆ </a></span>mulC() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::mulC </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>multiplier</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
</div>
</div>
<a id="ga29ed07435c1ab0da02627303594a9b73"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga29ed07435c1ab0da02627303594a9b73">◆ </a></span>mulC() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::mulC </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>multiplier</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
</div>
</div>
<a id="ga3c98a8ad1054d296500220737c04d18c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3c98a8ad1054d296500220737c04d18c">◆ </a></span>phase()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::phase </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>angleInDegrees</em> = <code>false</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the rotation angle of 2D vectors. </p>
<p>The function <a class="el" href="../../d2/de8/group__core__array.html#ga9db9ca9b4d81c3bde5677b8f64dc0137" title="Calculates the rotation angle of 2D vectors. ">cv::phase</a> calculates the rotation angle of each 2D vector that is formed from the corresponding elements of x and y : </p><p class="formulaDsp">
\[\texttt{angle} (I) = \texttt{atan2} ( \texttt{y} (I), \texttt{x} (I))\]
</p>
<p>The angle estimation accuracy is about 0.3 degrees. When x(I)=y(I)=0 , the corresponding angle(I) is set to 0. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>input floating-point array of x-coordinates of 2D vectors. </td></tr>
    <tr><td class="paramname">y</td><td>input array of y-coordinates of 2D vectors; it must have the same size and the same type as x. </td></tr>
    <tr><td class="paramname">angleInDegrees</td><td>when true, the function calculates the angle in degrees, otherwise, they are measured in radians. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>array of vector angles; it has the same size and same type as x. </dd></dl>
</div>
</div>
<a id="gae523b4bd51ddcca2833c9aebbd7fe5a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae523b4bd51ddcca2833c9aebbd7fe5a4">◆ </a></span>polarToCart()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::tuple&lt;<a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>, <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>&gt; cv::gapi::polarToCart </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>magnitude</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>angleInDegrees</em> = <code>false</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates x and y coordinates of 2D vectors from their magnitude and angle. </p>
<p>The function polarToCart calculates the Cartesian coordinates of each 2D vector represented by the corresponding elements of magnitude and angle: </p><p class="formulaDsp">
\[\begin{array}{l} \texttt{x} (I) = \texttt{magnitude} (I) \cos ( \texttt{angle} (I)) \\ \texttt{y} (I) = \texttt{magnitude} (I) \sin ( \texttt{angle} (I)) \\ \end{array}\]
</p>
<p>The relative accuracy of the estimated coordinates is about 1e-6.</p>
<p>First output is a matrix of x-coordinates of 2D vectors. Second output is a matrix of y-coordinates of 2D vectors. Both output must have the same size and depth as input matrices.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.polarToCart"</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">magnitude</td><td>input floating-point <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a> matrix (1xN) of magnitudes of 2D vectors; </td></tr>
    <tr><td class="paramname">angle</td><td>input floating-point <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a> matrix (1xN) of angles of 2D vectors. </td></tr>
    <tr><td class="paramname">angleInDegrees</td><td>when true, the input angles are measured in degrees, otherwise, they are measured in radians. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#ga3e20a87f89b397c27a9a8bfd57ff0180" title="Calculates the magnitude and angle of 2D vectors. ">cartToPolar</a>, <a class="el" href="../../d0/de1/group__core.html#ga96ff82d32417d677722a7e786425c98e">exp</a>, <a class="el" href="../../d0/de1/group__core.html#ga4eba02a849f926ee1764acde47108753">log</a>, <a class="el" href="../../d7/dcc/group__core__utils__softfloat.html#ga8bc36646a43b82baa15f151a973fb0c5" title="Raising to the power. ">pow</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#gaf3880c8feae9027fa91a701a1fd0d3b4" title="Calculates a square root of array elements. ">sqrt</a> </dd></dl>
</div>
</div>
<a id="gaf3880c8feae9027fa91a701a1fd0d3b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf3880c8feae9027fa91a701a1fd0d3b4">◆ </a></span>sqrt()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::sqrt </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates a square root of array elements. </p>
<p>The function <a class="el" href="../../da/dd3/group__gapi__math.html#gaf3880c8feae9027fa91a701a1fd0d3b4" title="Calculates a square root of array elements. ">cv::gapi::sqrt</a> calculates a square root of each input array element. In case of multi-channel arrays, each channel is processed independently. The accuracy is approximately the same as of the built-in std::sqrt . </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input floating-point array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>output array of the same size and type as src. </dd></dl>
</div>
</div>
<a id="gab2a1ac8bdeda1de78ec97f9cd8e9ff0a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab2a1ac8bdeda1de78ec97f9cd8e9ff0a">◆ </a></span>sub()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::sub </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the per-element difference between two matrices. </p>
<p>The function sub calculates difference between two matrices, when both matrices have the same size and the same number of channels: </p><p class="formulaDsp">
\[\texttt{dst}(I) = \texttt{src1}(I) - \texttt{src2}(I)\]
</p>
<p>The function can be replaced with matrix expressions: </p><p class="formulaDsp">
\[\texttt{dst} = \texttt{src1} - \texttt{src2}\]
</p>
<p>The input matrices and the output matrix can all have the same or different depths. For example, you can subtract two 8-bit unsigned matrices store the result as a 16-bit signed matrix. Depth of the output matrix is determined by the ddepth parameter. If <a class="el" href="../../d0/daf/group__projection.html#ga8b5e5413af41caf3f2a0bbf4cdf517a8" title="Returns the depth of a point transformed by a rigid transform. ">src1.depth()</a> == <a class="el" href="../../d0/daf/group__projection.html#ga8b5e5413af41caf3f2a0bbf4cdf517a8" title="Returns the depth of a point transformed by a rigid transform. ">src2.depth()</a>, ddepth can be set to the default -1. In this case, the output matrix will have the same depth as the input matrices. The matrices can be single or multi channel.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.sub" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src1</td><td>first input matrix. </td></tr>
    <tr><td class="paramname">src2</td><td>second input matrix. </td></tr>
    <tr><td class="paramname">ddepth</td><td>optional depth of the output matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#ga3fec036f5cf3f6cb8c2633c109085f0b" title="Calculates the per-element sum of two matrices. ">add</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#ga8b5f4be4cb0e2b52b03778fafddd0819" title="Calculates the per-element sum of matrix and given scalar. ">addC</a> </dd></dl>
</div>
</div>
<a id="gaa5979f64bab17bf1717f2842d6c1d53f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa5979f64bab17bf1717f2842d6c1d53f">◆ </a></span>subC()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::subC </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the per-element difference between matrix and given scalar. </p>
<p>The function can be replaced with matrix expressions: </p><p class="formulaDsp">
\[\texttt{dst} = \texttt{src} - \texttt{c}\]
</p>
<p>Depth of the output matrix is determined by the ddepth parameter. If ddepth is set to default -1, the depth of output matrix will be the same as the depth of input matrix. The matrices can be single or multi channel. Output matrix must have the same size as src.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.subC" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>first input matrix. </td></tr>
    <tr><td class="paramname">c</td><td>scalar value to subtracted. </td></tr>
    <tr><td class="paramname">ddepth</td><td>optional depth of the output matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#ga3fec036f5cf3f6cb8c2633c109085f0b" title="Calculates the per-element sum of two matrices. ">add</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#ga8b5f4be4cb0e2b52b03778fafddd0819" title="Calculates the per-element sum of matrix and given scalar. ">addC</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#ga755bf791d27f88ab5b4214575bf4c5a8" title="Calculates the per-element difference between given scalar and the matrix. ">subRC</a> </dd></dl>
</div>
</div>
<a id="ga755bf791d27f88ab5b4214575bf4c5a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga755bf791d27f88ab5b4214575bf4c5a8">◆ </a></span>subRC()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::subRC </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the per-element difference between given scalar and the matrix. </p>
<p>The function can be replaced with matrix expressions: </p><p class="formulaDsp">
\[\texttt{dst} = \texttt{val} - \texttt{src}\]
</p>
<p>Depth of the output matrix is determined by the ddepth parameter. If ddepth is set to default -1, the depth of output matrix will be the same as the depth of input matrix. The matrices can be single or multi channel. Output matrix must have the same size as src.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.math.subRC" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>scalar value to subtract from. </td></tr>
    <tr><td class="paramname">src</td><td>input matrix to be subtracted. </td></tr>
    <tr><td class="paramname">ddepth</td><td>optional depth of the output matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#ga3fec036f5cf3f6cb8c2633c109085f0b" title="Calculates the per-element sum of two matrices. ">add</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#ga8b5f4be4cb0e2b52b03778fafddd0819" title="Calculates the per-element sum of matrix and given scalar. ">addC</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#gaa5979f64bab17bf1717f2842d6c1d53f" title="Calculates the per-element difference between matrix and given scalar. ">subC</a> </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:41 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
